{% extends "cyphon/base.html" %}
{% load widget_tweaks %}
{% load staticfiles %}

{% block appcss %}
<link rel="stylesheet" type="text/css" href="{% static "appuser/css/appusers.css" %}">
{% endblock appcss %}

{% block content %}
<div class="container">
    <div class="row">
        <div class="col-xs-12 col-sm-6 col-sm-offset-3">
            <h1>{{ form_title }}</h1>
            {% if form_description %}
                <p>{{ form_description }}</p>
            {% endif %}
            {% if form.non_field_errors %}
            <div class="alert alert-danger">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                {% for error in form.non_field_errors %}
                    <p>{{ error }}</p>
                {% endfor %}
            </div><!-- /alert alert-danger -->
            {% endif %}
            <form method="post" action="{{ request.path }}">
                {% csrf_token %}
                {% for field in form.visible_fields %}
                    <div class="form_group">
                        {% if field.errors %}
                            <div class="alert alert-danger">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                {% for error in field.errors %}
                                    <p>{{ error }}</p>
                                {% endfor %}
                            </div>
                        {% endif %}
                        {{ field.label_tag }}
                        {{ field|add_class:"form-control" }}
                    </div>
                {% endfor %}
                <button type="submit" class="btn btn-primary">Register</button>
                <input type="hidden" name="next" value="{{ next }}">
            </form>
        </div><!-- /col-md-4 -->
    </div><!-- /row -->
</div>
{% endblock %}
